-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add reload-to-profile for Fusebox #117
Add reload-to-profile for Fusebox #117
Conversation
0bab29e
to
545b1d5
Compare
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under new architecture. Bridging for legacy Android and iOS will be added in follow-up diffs Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
…6856) Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256
Summary: Pull Request resolved: #46856 Changelog: [General][Added] - Add support for reload-to-profile in Fusebox. (Part 1 of 2: native) CDT: facebookexperimental/rn-chrome-devtools-frontend#117 React: facebook/react#31021 This diff adds support for reload2profile under bridge and bridgeless for iOS, Android, and C++ Reviewed By: hoxyq Differential Revision: D63233256 fbshipit-source-id: f2f2814491e785b03af143cc26639ef178881fff
this.#wall.listen((message: ReactDevToolsTypes.Message): void => { | ||
if (message.event === 'reloadAppForProfiling') { | ||
SDK.ResourceTreeModel.ResourceTreeModel.reloadAllPages(false); | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use bridge
for it, not wall
. Ideally, we should be using Store
, because this should be the only public API entrypoint.
But please use bridge
, just to make sure we use same thing as what extension is using, in case we are going to change this.
ca07da2
to
87f66ee
Compare
87f66ee
to
14660ef
Compare
addListener(event: string, listener: (params: unknown) => any): void; | ||
removeListener(event: string, listener: Function): void; | ||
shutdown: () => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will make it official in facebook/react#31274
override dispose(): void { | ||
this.#bridge?.removeListener('reloadAppForProfiling', this.#handleReloadAppForProfiling); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have some existing listeners that needs to be unsubscribed here too. Following up in #129
New types used by Fusebox facebookexperimental/rn-chrome-devtools-frontend#117
Summary
Dependant on Flow types from facebook/react#31021
Updated the TS def in this PR to allow building without errors. Will do a proper upgrade after everything has landed
Test plan
Test E2E in D63233256
Upstreaming plan
devtools-frontend
repo. I've reviewed the contribution guide.